home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-12 | 54.2 KB | 2,195 lines |
- This is an official patch to nn release 6.4
- -------------------------------------------
-
- PATCH #5
-
- Priority: MEDIUM
-
-
- These patches fix a few minor bugs in the 6.4 release, and add a few
- features based on patches sent to me. Notably, problems with posting
- with Cnews and nncheck dumping core when "on term" is present in the
- init file have been fixed.
-
- NOTICE: The following changes to initialization of string variables
- are *not* backwards compatible.
-
- 1. Setting of string variables will now *always* skip leading and
- trailing blanks and comments.
-
- 2. To include a leading or trailing blank, or a # in a string,
- they can be escaped using a \, e.g.
- set included-mark \ \#\ # set to <space><hash><space>
-
- 3. The normal special codes \n, \r, \t, \a, \f, \b, \e, and \\ are
- now understood in strings. Any other \x is mapped into x.
-
- 4. In the init file, a trailing \ on an input line specifies that
- the line is continued on the next input line. The trailing \
- is removed together with the following newline. Leading
- spaces on the following line are significant.
-
-
- This may cause problems with the "included-mark" variable if it has a
- value like "> " (use ">\ ") or " " (use "\ \ ").
-
- All changes are described in the updated RELEASE_NOTES file (read that
- for details about this patch). Thanks to all who reported bugs and
- provided fixes.
-
- To apply this patch, use nn's :patch command, or run this command from
- the shell in the root of the nn source tree:
- patch -p0 < this-article
-
-
- ++Kim Storm
-
- *** ./LAST/answer.c Tue May 29 18:36:18 1990
- --- answer.c Wed Jun 6 11:42:06 1990
- ***************
- *** 29,34 ****
- --- 29,35 ----
- export int include_art_id = 0;
- export int include_full_header = 0;
- export int orig_to_include_mask = 0x3;
- + export int include_mark_blanks = 0;
-
- export int empty_answer_check = 1; /* reject replies that are not edited */
- export int response_check_pause = 0; /* time to wait for background cmds */
- ***************
- *** 156,162 ****
- {
- if (extra_headers != NULL && *extra_headers != NUL) {
- while (*extra_headers != NUL) {
- ! if (*extra_headers == ';') {
- if (*++extra_headers == NUL) break;
- fputc(NL, t);
- ed_line++;
- --- 157,163 ----
- {
- if (extra_headers != NULL && *extra_headers != NUL) {
- while (*extra_headers != NUL) {
- ! if (*extra_headers == ';' || *extra_headers == NL) {
- if (*++extra_headers == NUL) break;
- fputc(NL, t);
- ed_line++;
- ***************
- *** 551,557 ****
- putc(c, t);
- if (ftell(art) >= ah->lpos) break;
- prevnl++;
- ! continue;
- }
- if (prevnl) {
- if (command != K_MAIL_OR_FORWARD || ftell(art) < ah->fpos)
- --- 552,558 ----
- putc(c, t);
- if (ftell(art) >= ah->lpos) break;
- prevnl++;
- ! if (!include_mark_blanks) continue;
- }
- if (prevnl) {
- if (command != K_MAIL_OR_FORWARD || ftell(art) < ah->fpos)
- ***************
- *** 696,702 ****
- int ngroups, i;
- char newsgroups[FILENAME*2];
-
- ! init_term();
- visit_init_file(0, (char *)NULL);
- current_group = NULL;
-
- --- 697,703 ----
- int ngroups, i;
- char newsgroups[FILENAME*2];
-
- ! init_term(1);
- visit_init_file(0, (char *)NULL);
- current_group = NULL;
-
- *** ./LAST/articles.c Wed May 16 11:22:34 1990
- --- articles.c Fri Jun 8 11:23:37 1990
- ***************
- *** 421,426 ****
- --- 421,427 ----
- case A_SEEN:
- case 0:
- if (flags & ACC_DO_KILL) {
- + ah->replies = db_hdr.dh_replies;
- ah->sender = db_data.dh_sender;
- ah->subject = db_data.dh_subject;
- if (kill_article(ah)) continue;
- *** ./LAST/articles.h Sat Apr 21 15:27:56 1990
- --- articles.h Thu Jun 7 10:21:39 1990
- ***************
- *** 52,54 ****
- --- 52,55 ----
- #define ACC_ON_SENDER FLAG(12) /* match on sender (only) */
- #define ACC_ON_SUBJECT FLAG(13) /* match on subject (also) */
- #define ACC_DO_KILL FLAG(14) /* do auto-kill/select */
- + #define ACC_PARSE_VARIABLES FLAG(15) /* kill, split, etc. */
- *** ./LAST/aux.sh Tue May 29 18:36:19 1990
- --- aux.sh Wed Jun 6 22:06:57 1990
- ***************
- *** 1,6 ****
- --- 1,9 ----
-
- # PREFIX is inserted above this line during Make
-
- + # make anne.jones happy (she is lost without a tty)
- + exec 3<&0
- +
- trap : 2 3
-
- PATH=/bin:$PATH
- *** ./LAST/conf/s-template.h Tue May 29 18:36:20 1990
- --- conf/s-template.h Tue Jun 12 09:23:42 1990
- ***************
- *** 124,136 ****
- #define HAVE_MKDIR /* */
-
- /*
- - * Define NO_RENAME if the rename() system call is not available.
- - * Notice: rename() is only used by the NNTP code.
- - */
- -
- - /* #define NO_RENAME /* */
- -
- - /*
- * Pick one:
- * Define HAVE_GETHOSTNAME if you have a BSD like gethostname routine.
- * Define HAVE_UNAME if a system V compatible uname() is available.
- --- 124,129 ----
- ***************
- *** 207,212 ****
- --- 200,232 ----
-
- #define FILENAME 256
-
- + /*
- + * Define USE_MALLOC_H if the faster malloc() in -lmalloc should be used.
- + * This requires that -lmalloc is added to EXTRA_LIB below.
- + *
- + * You can tune the malloc package through the following definitions
- + * according to the descriptions in malloc(3X):
- + */
- +
- + /* #define USE_MALLOC_H /* */
- +
- + /* #define MALLOC_GRAIN sizeof(double) /* M_GRAIN */
- + /* #define MALLOC_MAXFAST (MALLOC_GRAIN*4) /* M_MXFAST */
- + /* #define MALLOC_FASTBLOCKS 100 /* M_NLBLKS */
- +
- + /*
- + * NNTP support requires tcp/ip with socket interface.
- + *
- + * Define NO_RENAME if the rename() system call is not available.
- + * Define NO_BZERO if the bzero() function is not available.
- + * Define EXCELAN if the tcp/ip package is EXCELAN based.
- + * Define NNTP_EXTRA_LIB to any libraries required only for nntp.
- + */
- +
- + /* #define NO_RENAME /* */
- + /* #define NO_BZERO /* */
- + /* #define EXCELAN /* */
- + /* #define NNTP_EXTRA_LIB -lsocket /* */
-
- /*
- * Define standard compiler flags here:
- ***************
- *** 217,222 ****
- --- 237,244 ----
- /*
- * If your system requires other libraries when linking nn
- * specify them here:
- + *
- + * Standard loader flags can also be specified here!
- */
-
- #define EXTRA_LIB
- *** ./LAST/doc/INSTALLATION Sat May 5 19:02:36 1990
- --- doc/INSTALLATION Wed May 30 15:55:18 1990
- ***************
- *** 347,359 ****
- 2) User files and programs (machince dependent, shareable)
- Install the BIN_DIRECTORY programs.
-
- ! 3) Help files and auxiliary programs (shareable)
- ! Install the CLIENT_DIRECTORY and HELP_DIRECTORY files and programs.
-
- 4) Documentation (shareable)
- Install the MAN pages in the proper directories.
-
- ! 5) Online manual (shareable with 3)
- Format and install the online manual in HELP_DIRECTORY.
-
-
- --- 347,362 ----
- 2) User files and programs (machince dependent, shareable)
- Install the BIN_DIRECTORY programs.
-
- ! 3) Auxiliary programs (configuration dependent, shareable)
- ! Install the CLIENT_DIRECTORY files and programs.
-
- 4) Documentation (shareable)
- Install the MAN pages in the proper directories.
-
- ! 5) Help files (shareable)
- ! Install the HELP_DIRECTORY files (except online manual).
- !
- ! 6) Online manual (shareable with 5)
- Format and install the online manual in HELP_DIRECTORY.
-
-
- ***************
- *** 369,382 ****
-
- The `inst' script will list a menu with the following choices:
-
- ! (1)-(5) Install individual parts of the package.
-
- ! (s) Install a complete server + client package (1-5).
-
- (c) Install a client which accesses all its support files and
- the database via a network (2).
-
- ! (n) Install a client accessing only the database via a network (2-5).
-
- (m) Install only the nnmaster (1).
-
- --- 372,388 ----
-
- The `inst' script will list a menu with the following choices:
-
- ! (1)-(6) Install individual parts of the package.
-
- ! (s) Install a complete server + client package (1-6).
-
- (c) Install a client which accesses all its support files and
- the database via a network (2).
-
- ! (h) Install a client with local auxiliary files, but shared
- ! documentation and help files (2-3).
- !
- ! (n) Install a client accessing only the database via a network (2-6).
-
- (m) Install only the nnmaster (1).
-
- ***************
- *** 422,428 ****
- in the nnmaster manual, you must now edit the GROUPS file created by
- nnmaster in the DB_DIRECTORY. If you modify the GROUPS file, you must
- run the following command to register the changes to the GROUPS file.
- ! nnmaster -G
-
- When you are ready, you must start nnmaster to enter all the existing
- articles into the database. If you use the following command,
- --- 428,435 ----
- in the nnmaster manual, you must now edit the GROUPS file created by
- nnmaster in the DB_DIRECTORY. If you modify the GROUPS file, you must
- run the following command to register the changes to the GROUPS file.
- !
- ! $ MASTER_DIRECTORY/nnmaster -G
-
- When you are ready, you must start nnmaster to enter all the existing
- articles into the database. If you use the following command,
- ***************
- *** 442,448 ****
- You can also use the following command to do the initial collection of
- articles from a terminal and get a nice trace of the action:
-
- ! nnmaster -D -O45
-
- One or two numbers will be shown while a group is being collected.
- The first number is the number of the article currently being read.
- --- 449,455 ----
- You can also use the following command to do the initial collection of
- articles from a terminal and get a nice trace of the action:
-
- ! $ MASTER_DIRECTORY/nnmaster -D -O45
-
- One or two numbers will be shown while a group is being collected.
- The first number is the number of the article currently being read.
- ***************
- *** 664,670 ****
- After applying the patches, you will need to redo the compilation and
- installation steps:
-
- ! $ patch < PATCH_FILE (or use nn's :patch command)
- $ make all
- $ su
- # ./inst u
- --- 671,677 ----
- After applying the patches, you will need to redo the compilation and
- installation steps:
-
- ! $ patch -p0 < PATCH_FILE (or use nn's :patch command)
- $ make all
- $ su
- # ./inst u
- *** ./LAST/doc/NNTP Tue May 29 18:36:24 1990
- --- doc/NNTP Tue Jun 12 09:44:57 1990
- ***************
- *** 136,141 ****
- --- 136,144 ----
- You can define this symbol if your tcp/ip is based on the
- EXCELAN implementation (no netdb.h, no getservbyname(), no
- gethostbyname()). (This belongs in the s- file!)
- + You will (probably) also need to add -lsocket to NNTP_EXTRA_LIB.
- + Normally it will use port 119 for nntp, but this can be modified
- + through "#define IPPORT_NNTP 1150" (or similar) in the init file.
-
- NO_BZERO
- NO_RENAME
- ***************
- *** 142,147 ****
- --- 145,155 ----
- You can define these symbols if your system doesn't provide
- the bzero() and/or rename() functions (these #define:s belong
- in the s- file).
- +
- + NNTP_EXTRA_LIB
- + Here you can specify libraries and loader flags which are only
- + needed when compiled with NNTP. The normal EXTRA_LIB is still
- + used.
-
-
- TUNING
- *** ./LAST/doc/RELEASE_NOTES Tue May 29 18:36:24 1990
- --- doc/RELEASE_NOTES Tue Jun 12 11:05:25 1990
- ***************
- *** 684,690 ****
- --- 684,802 ----
- Title: L and J commands should work *at least* when menu contains all art.
- From: netmgr@VENUS.CSC.FI
-
- + Prog: aux
- + Title: Cnews' inews fails to find user id if LOGNAME is not set.
- + From: kreed@telesys.cts.com (Kevin W. Reed)
- + Fixed: Patch #5 [aux.sh]
- +
- + Prog: nnmaster
- + Title: If active file is *temporarily* unavailable, nnmaster dies.
- + From: matthew@ooc.uva.nl (Matthew Lewis)
- + Fixed: Patch #5 [master.c]
- +
- + Prog: nn
- + Title: Cannot subscribe to groups not in .newsrc if new-group-action=0
- + From: Nick Holloway <alfie@cs.warwick.ac.uk>
- + Fixed: Patch #5 [newsrc.c]
- +
- + Prog: nntp
- + Title: EXCELAN code tests rhost() < 0, should be == -1
- + From: Tom L. Baitz <tomb@viusys.uucp> + fix
- + Fixed: Patch #5 [nntp.c]
- +
- + Prog: nn
- + Title: menu-Z, read-X returns to same group
- + From: dean%coplex@relay.EU.net (Dean Brooks)
- + Fixed: Patch #5 [menu.c]
- +
- + Prog: inst
- + Title: u)pdate installs help files twice after patch #4.
- + From: rasmus%dmnboss@relay.EU.net (Rasmus Lerdorf)
- + Fixed: Patch #5 [inst.sh]
- +
- + Prog: nn
- + Title: Comments are not stripped from string variable assignments
- + From: Pete Siemsen <siemsen@usc.edu>
- + Fixed: Patch #5 [variable.c]
- +
- + Prog: nn
- + Title: G or :rmail on empty file could dump core
- + From: M.Maclaren@GDT.BATH.AC.UK + cause
- + Fixed: Patch #5 [news.c]
- +
- + Prog: nn
- + Title: clrdisp() may be used before init_term() is called.
- + From: ross%contact@relay.EU.net (Ross Ridge)
- + Fixed: Patch #5 [term.c]
- +
- + init_global() calls user_error() which calls clrdisp().
- +
- + Prog: nn
- + Title: ^A are output to the screen around "Variable settings:" header.
- + From: ross%contact@relay.EU.net (Ross Ridge)
- + Fixed: Patch #5 [variable.c]
- +
- + Prog: nn
- + Title: Some termcap:s requires ks/ke to be sent to use cursor keys.
- + From: JW_Schilperoort@pttrnl.nl
- + Fixed: Patch #5 [term.c -- cludge]
- +
- + But on some systems, ks/ke must *not* be sent because termcap is
- + broken (arrow keys are expected to send the "normal" sequences).
- +
- + Prog: nn
- + Title: + {select-auto} does not work with -x option (kill file not read)
- + From: ofl@oz.rci.dk (Ole Frank Larsen)
- + Fixed: Patch #5 [kill.c menu.c]
- +
- + Prog: nncheck, nntidy
- + Title: dumps core if "on term" is used in init file.
- + From: Peter Andersen <datpete@daimi.dk>
- + Fixed: Patch #5 [answer.c newsrc.c nn.c term.c]
- +
- + Prog: nn
- + Title: on term a b c... only tested for type "a"
- + From: Peter Andersen <datpete@daimi.dk>
- + Fixed: Patch #5 [init.c]
- +
- + Prog: inst mini-inews
- + Title: ./usercheck not found when doing make install for mini-inews
- + From: KFS
- + Fixed: Patch #5 [inst.sh]
-
- + Prog: nnmaster
- + Title: -E2 barfs on empty groups (and may not work at all!)
- + From: chuq@apple.com
- + Fixed: Patch #5 [expire.c]
- +
- + Prog: nn
- + Title: Some variables have no effect when set in an entry macro
- + From: pallas@Neon.Stanford.EDU (Joe Pallas)
- + Fixed: Patch #5 [articles.h nn.c group.c]
- +
- + These variables are: kill, cross-post, split, and sort
- +
- + Prog: nn
- + Title: Kill flags "a" and ">" does not work
- + From: David Lesher <wb8foz@mthvax.cs.miami.edu>
- + Fixed: Patch #5 [articles.c]
- +
- + Prog: nncheck
- + Title: "set silent" in init file make nncheck shut up.
- + From: grady@semprini.fx.com (Steven Grady)
- + Fixed: Patch #5 [nn.c]
- +
- + Prog: nnmaster - nntp
- + Title: If name server is busy, gethostbyname may fail
- + From: Sjoerd Mullender <sjoerd@cwi.nl> + fix
- + Fixed: Patch #5 [nntp.c]
- +
- + Prog: nn
- + Title: :local save-counter %d appends NL to save counter.
- + From: pak@regent.e-technik.tu-muenchen.dbp.de (Peter A. Krauss)
- + Fixed: Patch #5 [new parsing of string variables]
- +
- +
- New features since initial 6.4.0 release
- ----------------------------------------
-
- ***************
- *** 758,760 ****
- --- 870,904 ----
- Title: New variable: read-return-next-page
- From: Jeffrey (J.D.) Sparkes <JSPARKES@BNR.CA>
- Added: Patch #4 [menu.c variable.c nn.1]
- +
- + Prog: nn
- + Title: New variable: ignore-mark-blank-lines
- + From: KFS (requested by Uwe Doering)
- + Added: Patch #5 [answer.c variable.c nn.1]
- +
- + Prog: nn
- + Title: New re-layout value: 4
- + From: KFS (requested by Uwe Doering)
- + Added: Patch #5 [menu.c nn.1]
- +
- + Prog: nn
- + Title: New g and G flags in header-lines
- + From: KFS (requested by Uwe Doering)
- + Added: Patch #5 [more.c nn.1]
- +
- + Prog: nn
- + Title: Improved parsing of init file and variable settings
- + From: KFS
- + Added: Patch #5 [global.c init.c variable.c nn.1]
- +
- + See the header of patch #5 for more information!
- +
- + Prog: nn
- + Title: New message history for the ^P command
- + From: Jaap Vermeulen <jaap%sequent@relay.EU.net>
- + Added: Patch #5 [term.c menu.c more.c nn.1]
- +
- + Prog: nn
- + Title: New "kill-debug" variable to enable tracing of the auto-kill process.
- + From: KFS
- + Added: Patch #5 [kill.c variable.c nn.1]
- *** ./LAST/expire.c Fri May 4 18:41:22 1990
- --- expire.c Wed Jun 6 21:32:11 1990
- ***************
- *** 265,270 ****
- --- 265,272 ----
- goto error_handler; \
- }
-
- + if (!init_group(gh)) return 0;
- +
- old_x = old_d = new = NULL;
-
- #ifdef RENUMBER_DANGER
- *** ./LAST/global.c Tue May 29 18:36:25 1990
- --- global.c Sat Jun 2 01:06:42 1990
- ***************
- *** 350,358 ****
- return NULL;
- }
-
- !
- !
- !
- /*
- * relative -- concat directory name and file name
- */
- --- 350,384 ----
- return NULL;
- }
-
- ! fgets_multi(buf, size, f)
- ! char *buf;
- ! int size;
- ! register FILE *f;
- ! {
- ! register char c, *s = buf;
- ! register int n = size;
- !
- ! while (--n > 0) {
- ! c = getc(f);
- ! if (c == '\\') {
- ! if ((c = getc(f)) == NL) continue;
- ! *s++ = '\\';
- ! if (--n < 0) break;
- ! }
- ! if (c == EOF) {
- ! *s = NUL;
- ! return s != buf;
- ! }
- ! if (c == NL) {
- ! *s = NUL;
- ! return 1;
- ! }
- ! *s++ = c;
- ! }
- ! buf[30] = NUL;
- ! sys_error("Line too long \"%s...\" (max %d)", buf, size);
- ! }
- !
- /*
- * relative -- concat directory name and file name
- */
- *** ./LAST/group.c Tue May 29 18:36:26 1990
- --- group.c Thu Jun 7 10:21:39 1990
- ***************
- *** 180,185 ****
- --- 180,187 ----
- int menu_cmd, o_killed;
- article_number prev_last, n;
- register group_header *mg_head;
- + flag_type entry_access_mode = access_mode;
- + extern flag_type parse_access_flags();
-
- #define menu_return(cmd) { menu_cmd = (cmd); goto menu_exit; }
-
- ***************
- *** 199,204 ****
- --- 201,210 ----
- if (unread_at_reentry) restore_unread(gh);
-
- m_invoke(-1);
- +
- + access_mode = entry_access_mode;
- + if (access_mode & ACC_PARSE_VARIABLES)
- + access_mode |= parse_access_flags();
-
- killed_articles = 0;
-
- *** ./LAST/init.c Tue May 29 18:36:26 1990
- --- init.c Tue Jun 12 09:49:18 1990
- ***************
- *** 10,15 ****
- --- 10,18 ----
- #include "term.h"
- #include "keymap.h"
- #include "menu.h"
- + #ifdef USE_MALLOC_H
- + #include <malloc.h>
- + #endif
-
- import char *help_directory, *db_directory;
-
- ***************
- *** 16,21 ****
- --- 19,26 ----
- export int in_init = 0; /* true when parsing init file */
- export int alt_cmd_key; /* K_ when parse_command returns AC_KEYCMD */
-
- + export long initial_memory_break; /* for :debug statistics */
- +
- static int init_err = 0; /* errors in init file */
-
-
- ***************
- *** 31,36 ****
- --- 36,42 ----
- if (in_init) {
- fmt = va_arg1(char *);
-
- + visual_off();
- printf("init error: ");
- vprintf(fmt, va_args2toN);
- putchar(NL);
- ***************
- *** 53,59 ****
- if (cmd == NULL) return cmd;
-
- while (*cmd && isspace(*cmd)) cmd++;
- - if (*cmd == '\\' && isspace(cmd[1])) cmd++;
- if (*cmd == NUL || *cmd == NL) return NULL;
-
- return cmd;
- --- 59,64 ----
- ***************
- *** 76,90 ****
- argc = 0;
- argvec[0] = cmd;
-
- - if (in_init)
- - while (*cmd) {
- - if (*cmd == NL) {
- - *cmd = NUL;
- - break;
- - }
- - cmd++;
- - }
- -
- return 1;
- }
-
- --- 81,86 ----
- ***************
- *** 132,138 ****
- FILE **seq_hook_ptr;
- {
- FILE *init;
- ! char cmdbuf[512], *cmd, *term;
- extern char *term_name;
-
- /* use cmdbuf temporarily (to handle @ expansion) */
- --- 128,134 ----
- FILE **seq_hook_ptr;
- {
- FILE *init;
- ! char cmdbuf[1024], *cmd, *term;
- extern char *term_name;
-
- /* use cmdbuf temporarily (to handle @ expansion) */
- ***************
- *** 151,157 ****
- init = open_file(name, OPEN_READ);
- if (init == NULL) return;
-
- ! while (fgets(cmdbuf, 512, init)) {
- if (only_seq) {
- if (!is_sequence(cmdbuf)) continue;
- *seq_hook_ptr = init;
- --- 147,153 ----
- init = open_file(name, OPEN_READ);
- if (init == NULL) return;
-
- ! while (fgets_multi(cmdbuf, 1024, init)) {
- if (only_seq) {
- if (!is_sequence(cmdbuf)) continue;
- *seq_hook_ptr = init;
- ***************
- *** 458,465 ****
- --- 454,486 ----
-
- static print_debug_info()
- {
- + #ifdef USE_MALLOC_H
- + struct mallinfo mallinfo(), mi;
- + #endif
- + static long prev_mem = 0;
- + long cur_mem;
- + extern char *sbrk();
- +
- clrdisp();
- printf("group=%s, nart=%ld\n\r", current_group->group_name, n_articles);
- +
- + cur_mem = (((long)sbrk(0)) - initial_memory_break)/1024;
- +
- + printf("\nMemory usage: %ldk, previous: %ldk, change: %ldk\n\r",
- + cur_mem, prev_mem, cur_mem - prev_mem);
- + prev_mem = cur_mem;
- +
- + #ifdef USE_MALLOC_H
- + mi = mallinfo();
- + printf("\nMalloc info. Total allocation: %d\n\r", mi.arena);
- + printf("Ordinary blocks: %d, space in use: %d, space free: %d\n\r",
- + mi.ordblks, mi.uordblks, mi.fordblks);
- + printf("Small blocks: %d, space in use: %d, space free: %d\n\r",
- + mi.smblks, mi.usmblks, mi.fsmblks);
- + printf("Holding blocks: %d, space in headers: %d\n\r",
- + mi.hblks, mi.hblkhd);
- + #endif
- +
- any_key(0);
- }
-
- ***************
- *** 467,472 ****
- --- 488,494 ----
- char *str;
- {
- char **av;
- + char buf[1024];
-
- if (!in_init) {
- msg(str);
- ***************
- *** 473,482 ****
- return;
- }
-
- ! printf("\r%s:", str);
- ! for (av = argvec; *av; av++)
- ! printf(" %s", *av);
- ! putchar(NL);
- }
-
-
- --- 495,506 ----
- return;
- }
-
- ! buf[0] = NUL;
- ! for (av = argvec; *av; av++) {
- ! strcat(buf, " ");
- ! strcat(buf, *av);
- ! }
- ! init_message("%s: %s", str, buf);
- }
-
-
- ***************
- *** 719,725 ****
- FILE *f;
- {
- register char *cp;
- ! char buf[256];
-
- if (argv(1) == NULL) goto on_err;
-
- --- 743,749 ----
- FILE *f;
- {
- register char *cp;
- ! char buf[1024];
-
- if (argv(1) == NULL) goto on_err;
-
- ***************
- *** 769,775 ****
- int i;
-
- for (i = 2; argv(i) != NULL; i++)
- ! if (strcmp(argv(2), term_name) == 0) return;
- break;
- }
-
- --- 793,799 ----
- int i;
-
- for (i = 2; argv(i) != NULL; i++)
- ! if (strcmp(argv(i), term_name) == 0) return;
- break;
- }
-
- ***************
- *** 786,792 ****
- goto on_err;
- }
-
- ! while (fgets(buf, 256, f) != NULL) {
- for (cp = buf; *cp && isascii(*cp) && isspace(*cp); cp++);
- if (strncmp(cp, "end", 3) == 0) return;
- }
- --- 810,816 ----
- goto on_err;
- }
-
- ! while (fgets_multi(buf, 1024, f) != NULL) {
- for (cp = buf; *cp && isascii(*cp) && isspace(*cp); cp++);
- if (strncmp(cp, "end", 3) == 0) return;
- }
- ***************
- *** 1087,1092 ****
- --- 1111,1117 ----
- CASE( "rmail" ) {
- import char *mail_box;
- group_header *orig_group;
- + int rv;
-
- if (mail_box == NULL) {
- msg("'mail' path not defined");
- ***************
- *** 1094,1103 ****
- }
-
- orig_group = current_group;
- ! folder_menu(mail_box, 2);
- init_group(orig_group);
-
- ! return AC_REDRAW;
- }
-
- CASE( "mkdir" ) {
- --- 1119,1128 ----
- }
-
- orig_group = current_group;
- ! rv = folder_menu(mail_box, 2);
- init_group(orig_group);
-
- ! return rv == ME_NO_REDRAW ? ok_val : AC_REDRAW;
- }
-
- CASE( "mkdir" ) {
- *** ./LAST/inst.sh Tue May 29 18:36:27 1990
- --- inst.sh Wed Jun 6 19:32:40 1990
- ***************
- *** 42,47 ****
- --- 42,50 ----
- ;;
-
- inews)
- + if [ ! -f ./usercheck ] ; then
- + ln ../usercheck usercheck
- + fi
- if [ ! -d "${INEWS_DIR}"/. ]
- then
- ../inst mkdir ${INEWS_DIR} 755 || exit 1
- ***************
- *** 159,165 ****
- fi
- if [ -f "$LIB/aux" ]
- then
- ! OPT="$OPT aux help"
- fi
- if [ -d "$HELP" ]
- then
- --- 162,168 ----
- fi
- if [ -f "$LIB/aux" ]
- then
- ! OPT="$OPT aux"
- fi
- if [ -d "$HELP" ]
- then
- *** ./LAST/kill.c Wed May 16 11:23:40 1990
- --- kill.c Fri Jun 8 11:47:38 1990
- ***************
- *** 10,15 ****
- --- 10,17 ----
-
- export int killed_articles;
- export int dflt_kill_select = 30;
- + export int kill_file_loaded = 0;
- + export int kill_debug = 0;
-
- char KILL_FILE[] = "kill";
- char COMPILED_KILL[] = "KILL.COMP";
- ***************
- *** 137,142 ****
- --- 139,146 ----
- if (do_select && (flag & AUTO_SELECT) == 0) goto failed;
- if (do_kill && (flag & AUTO_KILL) == 0) goto failed;
-
- + if (kill_debug) print_kill(kl);
- +
- if (flag & KILL_UNLESS_MATCH)
- *unlessp = 1;
-
- ***************
- *** 174,179 ****
- --- 178,187 ----
- break;
-
- match:
- + if (kill_debug) {
- + pg_next();
- + printf("%sMATCH\n", flag & AND_MATCH ? "PARTIAL " : "");
- + }
- if (flag & AND_MATCH) continue;
- break;
- }
- ***************
- *** 187,192 ****
- --- 195,209 ----
- register kill_list_entry *kl;
- int unless_match = 0;
-
- + if (kill_debug) {
- + clrdisp();
- + pg_init(0, 1);
- + pg_next();
- + so_printf("\1KILL: %s: %s%-.40s (%d)\1",
- + ah->sender, ah->replies & 0x80 ? "Re: " : "",
- + ah->subject, ah->replies & 0x7f);
- + }
- +
- kl = exec_kill((kill_list_entry *)(current_group->kill_list), ah,
- &unless_match, 0, 0);
- if (kl == NULL && group_regexp_table != NULL) {
- ***************
- *** 197,218 ****
- kl = exec_kill(global_kill_list, ah, &unless_match, 0, 0);
-
- if (kl != NULL) {
- ! if (kl->kill_flag & AUTO_KILL) {
- ! killed_articles++;
- ! return 1;
- ! }
-
- if (kl->kill_flag & AUTO_SELECT)
- ah->attr = A_AUTO_SELECT;
- ! return 0;
- }
-
- ! if (unless_match) {
- ! killed_articles++;
- ! return 1;
- ! }
-
- return 0;
- }
-
-
- --- 214,237 ----
- kl = exec_kill(global_kill_list, ah, &unless_match, 0, 0);
-
- if (kl != NULL) {
- ! if (kl->kill_flag & AUTO_KILL)
- ! goto did_kill;
-
- if (kl->kill_flag & AUTO_SELECT)
- ah->attr = A_AUTO_SELECT;
- ! goto no_kill;
- }
-
- ! if (unless_match) goto did_kill;
-
- + no_kill:
- + if (kill_debug) pg_end();
- return 0;
- +
- + did_kill:
- + if (kill_debug) pg_end();
- + killed_articles++;
- + return 1;
- }
-
-
- ***************
- *** 821,826 ****
- --- 840,846 ----
-
- fclose(killf);
-
- + kill_file_loaded = 1;
- return 1;
-
- err:
- ***************
- *** 895,900 ****
- --- 915,921 ----
-
- if (kill_patterns != NULL) freeobj(kill_patterns);
- if (kill_tab != NULL) freeobj(kill_tab);
- + kill_file_loaded = 0;
- }
-
-
- ***************
- *** 918,927 ****
- flag & AUTO_KILL ? " UNLESS" :
- flag & AUTO_SELECT ? "" : "KEEP");
-
- ! printf("%s '%.35s'%s\n",
- flag & ON_SUBJECT ? "SUBJECT" :
- ! flag & ON_SENDER ? "NAME" : "????",
-
- kl->kill_pattern,
-
- flag & KILL_CASE_MATCH ?
- --- 939,950 ----
- flag & AUTO_KILL ? " UNLESS" :
- flag & AUTO_SELECT ? "" : "KEEP");
-
- ! printf("%s '%s%.35s'%s\n",
- flag & ON_SUBJECT ? "SUBJECT" :
- ! flag & ON_SENDER ? "NAME" :
- ! flag & ON_ANY_REFERENCES ? "ANY REF" : "????",
-
- + flag & ON_FOLLOW_UP ? "Re: " : "",
- kl->kill_pattern,
-
- flag & KILL_CASE_MATCH ?
- *** ./LAST/macro.c Thu Apr 26 20:47:51 1990
- --- macro.c Tue Jun 12 09:49:19 1990
- ***************
- *** 319,325 ****
- char *id;
- FILE *f;
- {
- ! char line[256], *lp, skip;
- int type = 0;
-
- if (id) {
- --- 319,325 ----
- char *id;
- FILE *f;
- {
- ! char line[1024], *lp, skip;
- int type = 0;
-
- if (id) {
- ***************
- *** 360,366 ****
- skip = 0;
- initial_set_commands = (cur_m == NMACRO);
-
- ! while (fgets(line, 256, f)) {
- for (lp = line; *lp && isspace(*lp); lp++);
- if (*lp == NUL) continue;
- if (*lp == ')' || strncmp(lp, "end", 3) == 0) goto out;
- --- 360,366 ----
- skip = 0;
- initial_set_commands = (cur_m == NMACRO);
-
- ! while (fgets_multi(line, 1024, f)) {
- for (lp = line; *lp && isspace(*lp); lp++);
- if (*lp == NUL) continue;
- if (*lp == ')' || strncmp(lp, "end", 3) == 0) goto out;
- *** ./LAST/man/nn.1.A Tue May 22 12:53:44 1990
- --- man/nn.1.A Tue Jun 12 11:05:47 1990
- ***************
- *** 234,240 ****
- Redraw screen (Same as ^L).
- .TP
- \&\fB^P\fP {\fBmessage\fP}
- ! Repeat the last message shown on the message line.
- .TP
- \&\fB!\fP {\fBshell\fP}
- Shell escape. The user is prompted for a command which is executed
- --- 234,242 ----
- Redraw screen (Same as ^L).
- .TP
- \&\fB^P\fP {\fBmessage\fP}
- ! Repeat the last message shown on the message line. The command can be
- ! repeated to successively show previous messages (the maximum number of
- ! saved messages is controlled via the \fBmessage-history\fP variable.)
- .TP
- \&\fB!\fP {\fBshell\fP}
- Shell escape. The user is prompted for a command which is executed
- ***************
- *** 259,264 ****
- --- 261,267 ----
- .LP
- \fBRelated and basic variables\fP:
- backup, backup-suffix, confirm-auto-quit, expert, mail,
- + message-history,
- new-group-action, newsrc, quick-count.
- .SH SELECTION MODE
- In selection mode, the screen is divided into four parts: the header
- *** ./LAST/man/nn.1.B Tue May 29 18:36:28 1990
- --- man/nn.1.B Tue Jun 12 11:05:47 1990
- ***************
- *** 566,580 ****
- Specify an auto-select \fB+\fP or an auto-kill \fB!\fP entry,
- respectively. If neither are used, the article is neither selected
- nor killed which is useful in combination with the `\fB~\fP' flag.
- - .LP
- - For each \fIstring\fP, the \fIflags\fP field must contain the following
- - characters defining the interpretation of the corresponding
- - \fIstring\fP:
- .TP
- ! \fBn\fP or \fBs\fP (mandatory)
- .br
- Specify whether the corresponding string applies to the name \fBn\fP
- ! or to the subject \fBs\fP of an article.
- .TP
- \fB/\fP (optional)
- .br
- --- 566,584 ----
- Specify an auto-select \fB+\fP or an auto-kill \fB!\fP entry,
- respectively. If neither are used, the article is neither selected
- nor killed which is useful in combination with the `\fB~\fP' flag.
- .TP
- ! \fB>\fP (optional)
- ! When used with a subject (flag \fBs\fP), the kill entry only matches
- ! follow-ups to that subject (i.e. where the Subject: line starts with
- ! Re:). For example, to kill all "Re:"'s in rec.humor use the following
- ! kill entry: rec.humor:!>s/:.
- ! .TP
- ! \fBn\fP or \fBs\fP or \fBa\fP (mandatory)
- .br
- Specify whether the corresponding string applies to the name \fBn\fP
- ! or to the subject \fBs\fP of an article. If flag \fBa\fP is used, the
- ! corresponding string is ignored (but must be present), and the entry
- ! applies to articles with a non-empty References: line.
- .TP
- \fB/\fP (optional)
- .br
- *** ./LAST/man/nn.1.C Tue May 29 18:36:29 1990
- --- man/nn.1.C Tue Jun 12 11:05:47 1990
- ***************
- *** 113,123 ****
- .br
- \fBset\fP \fIvariable string\fP
- .br
- ! Except for file and directory names, the
- ! .I string
- value starts at the first non-blank character after the variable name
- ! and continues to the end of the line \fIincluding all trailing
- ! blanks on the line\fP!
- .LP
- Key variables control the keys used to control special functions
- during user input such as line editing and completion. They are set
- --- 113,132 ----
- .br
- \fBset\fP \fIvariable string\fP
- .br
- ! Normally, the \fIstring\fP value assigned to the \fIvariable\fP
- value starts at the first non-blank character after the variable name
- ! and ends with the last non-blank character (excluding comments) on the
- ! line. To include leading or trailing blanks, or the comment start
- ! symbol, #, in the string they must be escaped using a backslash `\e',
- ! e.g. to set \fBincluded-mark\fP to the string " # ", the following
- ! assignment can be used:
- ! .sp 0.5v
- ! set included-mark \e\ \e#\e\ \ \ # blank-#-blank
- ! .sp 0.5v
- ! To include a backslash in the string, it must be duplicated `\e\e'.
- ! A backslash may also be used to include the following special
- ! characters in the string: \ea=alarm, \eb=backspace, \ee=escape,
- ! \ef=form-feed, \en=new-line, \er=return, \et=tab.
- .LP
- Key variables control the keys used to control special functions
- during user input such as line editing and completion. They are set
- ***************
- *** 464,469 ****
- --- 473,483 ----
- header of the original article. If it is not set, it only includes
- the header when the article is forwarded without being edited.
- .TP
- + \fBinclude-mark-blank-lines\fP (boolean, default false)
- + When set, the \fBincluded-mark\fP is placed on blank lines in included
- + articles. Otherwise, blank lines are left blank (to make it easy to
- + delete whole paragraphs with `d}' in vi and `C-@ M-] C-W' in emacs).
- + .TP
- \fBincluded-mark\fP \fIstring\fP (string, default ">")
- This string is prefixed to all lines in the original article that are
- included in a reply or a follow-up. (Now you have the possibility to
- ***************
- *** 484,489 ****
- --- 498,507 ----
- .I kill
- file.
- .TP
- + \fBkill-debug\fP (boolean, default false)
- + When set, \fInn\fP will display a trace of the auto-kill/select
- + process on entry to a group.
- + .TP
- \fBkill-key\fP \fIkey\fP (key, default tty kill key)
- The key which deletes the current line
- when \fInn\fP is prompting for a string, e.g. a file name.
- ***************
- *** 587,592 ****
- --- 605,614 ----
- of the terminal if possible) to indicate the end of the overlap (see the
- \fBoverlap\fP variable).
- .TP
- + \fBmessage-history\fP \fIN\fP (integer, default 15)
- + Specifies the maximum number, \fIN\fP, of older messages which can be
- + recalled with the \fB^P\fP {\fBmessage\fP} command.
- + .TP
- \fBmin-window\fP \fIsize\fP (integer, default 7)
- When the \fBwindow\fP variable is not set, \fInn\fP will clear the
- screen to preview an article if there are less than \fIsize\fP unused
- ***************
- *** 766,771 ****
- --- 788,794 ----
- 1: A single `>' is shown if the Subject contains Re:.
- 2: The number of references is shown as `n>'
- 3: A single Re: is shown.
- + 4: If any references use layout 0, else layout 1.
- .fi
- .TP
- \fBread-return-next-page\fP (boolean, default false)
- *** ./LAST/man/nn.1.D Tue May 22 12:53:49 1990
- --- man/nn.1.D Tue Jun 12 11:05:47 1990
- ***************
- *** 33,38 ****
- --- 33,42 ----
- .br
- \fBF\fP From:
- .br
- + \fBG\fP Newsgroup: (current group)
- + .br
- + \fBg\fP Newsgroup: (current group if cross-posted or merged)
- + .br
- \fBI\fP Message-Id:
- .br
- \fBK\fP Keywords:
- ***************
- *** 720,730 ****
- \&\fI.nn\fP directory. The private init file is read after the global
- init file to allow the user to change the default setup.
- .LP
- The init file may contain the following types of commands (and data):
- .TP
- .B Comments
- Empty lines and lines with a # character as the first non-blank
- ! character are ignored.
- .TP
- .B Variable settings
- You can
- --- 724,740 ----
- \&\fI.nn\fP directory. The private init file is read after the global
- init file to allow the user to change the default setup.
- .LP
- + The init file is parsed one line at a time. If a line ends with a
- + backslash `\e', the backslash is ignored, and the following line is
- + appended to the current line.
- + .LP
- The init file may contain the following types of commands (and data):
- .TP
- .B Comments
- Empty lines and lines with a # character as the first non-blank
- ! character are ignored. Except where # has another meaning defined by
- ! the command syntax (e.g. multi-keys are named #\fIn\fP), trailing
- ! comments on input lines are ignored.
- .TP
- .B Variable settings
- You can
- *** ./LAST/master.c Tue May 29 18:36:31 1990
- --- master.c Wed May 30 15:46:23 1990
- ***************
- *** 699,708 ****
- continue;
- }
- #endif
- !
- ! age_active = file_exist(news_active, "fr");
- ! if (!use_nntp && age_active == (time_t)0)
- ! sys_error("Cannot access active file");
-
- if (unconditional) {
- master.last_scan = age_active - 60;
- --- 699,711 ----
- continue;
- }
- #endif
- ! temp=2;
- ! while ((age_active = file_exist(news_active, "fr")) == (time_t)0) {
- ! if (use_nntp) break;
- ! if (--temp < 0)
- ! sys_error("Cannot access active file");
- ! sleep(5); /* maybe a temporary glitch ? */
- ! }
-
- if (unconditional) {
- master.last_scan = age_active - 60;
- *** ./LAST/menu.c Tue May 29 18:36:33 1990
- --- menu.c Wed Jun 6 19:21:53 1990
- ***************
- *** 91,96 ****
- --- 91,99 ----
- case 3:
- so_printf("Re: ");
- return 4;
- + case 4:
- + if (level == 0 && re) level++;
- + break;
- }
-
- if (level < 10) {
- ***************
- *** 269,275 ****
- --- 272,282 ----
- register article_number i;
- register article_header *ah, **ahp;
- int count = 0, o_cura;
- + extern int kill_file_loaded;
-
- + if (mode == 1 && re == NULL)
- + if (!kill_file_loaded && !init_kill()) return 0;
- +
- o_cura = cura;
-
- for (i = 0, ahp = articles; i < n_articles; i++, ahp++) {
- ***************
- *** 437,443 ****
- if (ah->attr == 0 || (ah->attr & A_SELECT))
- ah->attr = A_READ;
- }
- ! return cmd;
- }
-
- prev = cur; cur = next;
- --- 444,450 ----
- if (ah->attr == 0 || (ah->attr & A_SELECT))
- ah->attr = A_READ;
- }
- ! return MC_NEXTGROUP;
- }
-
- prev = cur; cur = next;
- ***************
- *** 500,506 ****
- }
- }
-
- ! if (any_message) clrmsg(-1);
- return map;
- }
-
- --- 507,513 ----
- }
- }
-
- ! if (any_message && map != K_LAST_MESSAGE) clrmsg(-1);
- return map;
- }
-
- *** ./LAST/more.c Tue May 22 12:53:54 1990
- --- more.c Wed Jun 6 19:21:52 1990
- ***************
- *** 69,74 ****
- --- 69,76 ----
- 'X', "References", &news.ng_ref, 0,
- 'Y', "Summary", &news.ng_summ, 0,
- 'd', "Date-Received", &news.ng_rdate, 0,
- + 'g', "Newsgroup", &news.ng_groups, 0,
- + 'G', "Newsgroup", &news.ng_groups, 0,
- 'n', "Newsgroups", &news.ng_groups, 0,
- 'x', "Back-Ref", &news.ng_bref, 0,
- 0
- ***************
- *** 317,325 ****
- } else
- if ((lp = *(hdef->news)) == NULL)
- break;
- ! if (*hdrline == 'n')
- if ((current_group->group_flag & G_MERGED) == 0 &&
- strchr(lp, ',') == NULL) break;
-
- gotoxy(0, lno++);
- printf("%s: ", hdef->text);
- --- 319,329 ----
- } else
- if ((lp = *(hdef->news)) == NULL)
- break;
- ! if (*hdrline == 'n' || *hdrline == 'g')
- if ((current_group->group_flag & G_MERGED) == 0 &&
- strchr(lp, ',') == NULL) break;
- + if (*hdrline == 'g' || *hdrline == 'G')
- + lp = current_group->group_name;
-
- gotoxy(0, lno++);
- printf("%s: ", hdef->text);
- ***************
- *** 736,742 ****
-
- if (s_hangup) c = K_QUIT;
-
- ! if (any_message) clrmsg(0);
-
- if (c & K_MACRO) {
- m_invoke(c & ~K_MACRO);
- --- 740,746 ----
-
- if (s_hangup) c = K_QUIT;
-
- ! if (any_message && c != K_LAST_MESSAGE) clrmsg(0);
-
- if (c & K_MACRO) {
- m_invoke(c & ~K_MACRO);
- *** ./LAST/news.c Tue May 29 18:36:33 1990
- --- news.c Sat Jun 2 00:58:24 1990
- ***************
- *** 27,32 ****
- --- 27,36 ----
- date_only = modes & GET_DATE_ONLY;
-
- siz = fread(hdrbuf, sizeof(char), NEWS_HEADER_BUFFER, f);
- + if (siz <= 0) {
- + hdrbuf[0] = NUL;
- + return hdrbuf;
- + }
-
- bp = hdrbuf;
- bp[siz-1] = NUL;
- *** ./LAST/newsrc.c Tue May 29 18:36:35 1990
- --- newsrc.c Fri Jun 8 14:27:21 1990
- ***************
- *** 378,392 ****
-
- /* NEW GROUP - ADD TO NEWSRC AS APPROPRIATE */
-
- - if (new_group_action == RCX_NEVER) {
- - gh->group_flag |= G_DONE; /* will not enter sequence */
- - continue;
- - }
- -
- switch (new_group_action) {
- case RCX_NEVER:
- /* no not add new groups */
- ! gh->group_flag |= G_DONE;
- continue;
-
- case RCX_HEAD:
- --- 378,387 ----
-
- /* NEW GROUP - ADD TO NEWSRC AS APPROPRIATE */
-
- switch (new_group_action) {
- case RCX_NEVER:
- /* no not add new groups */
- ! gh->group_flag |= G_DONE | G_UNSUBSCRIBED;
- continue;
-
- case RCX_HEAD:
- ***************
- *** 1297,1307 ****
-
- if (grep_long) {
- if (header)
- ! printf("SUBSCR NEW UNREAD SEQUENCE GROUP\n");
- header = 0;
-
- ! printf(" %s %s ",
- (gh->group_flag & G_UNSUBSCRIBED) ? "no " : "yes",
- (gh->group_flag & G_NEW) ? "yes" : "no ");
-
- if (gh->unread_count > 0)
- --- 1292,1303 ----
-
- if (grep_long) {
- if (header)
- ! printf("SUBSCR IN_RC NEW UNREAD SEQUENCE GROUP\n");
- header = 0;
-
- ! printf(" %s %s %s ",
- (gh->group_flag & G_UNSUBSCRIBED) ? "no " : "yes",
- + (gh->newsrc_line == NULL) ? "no " : "yes",
- (gh->group_flag & G_NEW) ? "yes" : "no ");
-
- if (gh->unread_count > 0)
- ***************
- *** 1498,1504 ****
- total = groups = 0;
-
- if (goback_interact) {
- ! init_term();
- raw();
- }
-
- --- 1494,1500 ----
- total = groups = 0;
-
- if (goback_interact) {
- ! init_term(1);
- raw();
- }
-
- *** ./LAST/nn.c Tue May 29 18:36:36 1990
- --- nn.c Mon Jun 11 14:34:36 1990
- ***************
- *** 11,16 ****
- --- 11,19 ----
- #include "options.h"
- #include "proto.h"
- #include "articles.h"
- + #ifdef USE_MALLOC_H
- + #include <malloc.h>
- + #endif
-
- import char *bin_directory;
-
- ***************
- *** 114,129 ****
- return 0; /* will not update .newsrc */
- }
-
- ! if (proto_lock(I_AM_NN, PL_SET)) {
- ! printf("\nAnother nn process is already running\n\n");
- ! return 1;
- ! }
-
- must_unlock = 1;
- return 0;
- }
-
- ! static flag_type setup_access()
- {
- flag_type access_mode = 0;
-
- --- 117,132 ----
- return 0; /* will not update .newsrc */
- }
-
- ! if (proto_lock(I_AM_NN, PL_SET))
- ! user_error("\nAnother nn process is already running\n\n");
-
- must_unlock = 1;
- return 0;
- }
-
- ! #define setup_access() ACC_PARSE_VARIABLES
- !
- ! flag_type parse_access_flags()
- {
- flag_type access_mode = 0;
-
- ***************
- *** 538,543 ****
- --- 541,562 ----
- int say_welcome = 0, cmd;
- flag_type access_mode;
- char *mask;
- + extern long initial_memory_break;
- + extern char *sbrk();
- +
- + initial_memory_break = (long)sbrk(0);
- +
- + #ifdef USE_MALLOC_H
- + #ifdef MALLOC_MAXFAST
- + mallopt(M_MXFAST, MALLOC_MAXFAST);
- + #endif
- + #ifdef MALLOC_FASTBLOCKS
- + mallopt(M_NLBLKS, MALLOC_FASTBLOCKS);
- + #endif
- + #ifdef MALLOC_GRAIN
- + mallopt(M_GRAIN, MALLOC_GRAIN));
- + #endif
- + #endif
-
- pname = program_name(argv);
-
- ***************
- *** 631,637 ****
- switch (who_am_i) {
-
- case I_AM_NN:
- ! init_term();
-
- if (say_welcome) {
- display_file("adm.welcome", CLEAR_DISPLAY | CONFIRMATION);
- --- 650,656 ----
- switch (who_am_i) {
-
- case I_AM_NN:
- ! init_term(1);
-
- if (say_welcome) {
- display_file("adm.welcome", CLEAR_DISPLAY | CONFIRMATION);
- ***************
- *** 685,691 ****
-
- case I_AM_ADMIN:
- if (argc == 1) {
- ! init_term();
- visit_init_file(0, (char *)NULL);
- }
- admin_mode(argv[1]);
- --- 704,710 ----
-
- case I_AM_ADMIN:
- if (argc == 1) {
- ! init_term(1);
- visit_init_file(0, (char *)NULL);
- }
- admin_mode(argv[1]);
- ***************
- *** 692,698 ****
- --- 711,719 ----
- nn_exit(0);
-
- case I_AM_CHECK:
- + init_term(0);
- visit_init_file(0, (char *)NULL);
- + silent = 0; /* override setting in init file */
- group_name_args =
- parse_options(argc, argv, (char *)NULL, check_options,
- " [group]...");
- ***************
- *** 703,708 ****
- --- 724,730 ----
- break;
-
- case I_AM_TIDY:
- + init_term(0);
- visit_init_file(0, (char *)NULL);
- group_name_args = opt_nntidy(argc, argv);
- break;
- *** ./LAST/nntp.c Tue May 29 18:36:36 1990
- --- nntp.c Mon Jun 11 14:34:35 1990
- ***************
- *** 39,46 ****
- --- 39,48 ----
- #endif
-
- #ifdef EXCELAN
- + #ifndef IPPORT_NNTP
- #define IPPORT_NNTP 119
- #endif
- + #endif
-
- import char *db_directory, *tmp_directory, *news_active;
-
- ***************
- *** 276,283 ****
- if ((sp = getservbyname("nntp", "tcp")) == NULL)
- sys_error("nntp/tcp: Unknown service.\n");
-
- ! if ((hp = gethostbyname(nntp_server)) == NULL)
- ! sys_error("NNTP server %s unknown.\n", nntp_server);
-
- bzero((char *) &sin, sizeof(sin));
- sin.sin_family = hp->h_addrtype;
- --- 278,289 ----
- if ((sp = getservbyname("nntp", "tcp")) == NULL)
- sys_error("nntp/tcp: Unknown service.\n");
-
- ! s = who_am_i == I_AM_MASTER ? 10 : 2;
- ! while ((hp = gethostbyname(nntp_server)) == NULL) {
- ! if (--s < 0)
- ! sys_error("NNTP server %s unknown.\n", nntp_server);
- ! sleep(10);
- ! }
-
- bzero((char *) &sin, sizeof(sin));
- sin.sin_family = hp->h_addrtype;
- ***************
- *** 317,323 ****
-
- sin.sin_port = htons(IPPORT_NNTP);
- machine = nntp_server;
- ! if ((sin.sin_addr.s_addr = rhost(&machine)) < 0)
- sys_error("%s: Unknown host.", nntp_server);
-
- /* And then connect */
- --- 323,329 ----
-
- sin.sin_port = htons(IPPORT_NNTP);
- machine = nntp_server;
- ! if ((sin.sin_addr.s_addr = rhost(&machine)) == -1)
- sys_error("%s: Unknown host.", nntp_server);
-
- /* And then connect */
- *** ./LAST/patchlevel.h Tue May 29 18:36:37 1990
- --- patchlevel.h Mon Jun 11 09:51:13 1990
- ***************
- *** 15,21 ****
- * 1990-05-15: Patch #2 (6.4.2) - HIGH
- * 1990-05-21: Patch #3 (6.4.3) - HIGH
- * 1990-05-29: Patch #4 (6.4.4) - HIGH
- */
-
- ! #define PATCHLEVEL 4
-
- --- 15,22 ----
- * 1990-05-15: Patch #2 (6.4.2) - HIGH
- * 1990-05-21: Patch #3 (6.4.3) - HIGH
- * 1990-05-29: Patch #4 (6.4.4) - HIGH
- + * 1990-06-11: Patch #5 (6.4.5) - MEDIUM
- */
-
- ! #define PATCHLEVEL 5
-
- *** ./LAST/term.c Tue May 29 18:36:39 1990
- --- term.c Thu Jun 7 13:54:51 1990
- ***************
- *** 20,30 ****
- extern int s_resized;
- #endif
-
- export char *term_name = NULL;
- export int show_current_time = 1;
- export int conf_dont_sleep = 0;
- export int prompt_length;
- ! export int terminal_speed;
- export int slow_speed = 1200;
- export int any_message = 0;
- export int flow_control = 1;
- --- 20,37 ----
- extern int s_resized;
- #endif
-
- + struct msg_list {
- + char *buf;
- + struct msg_list *prev;
- + };
- + static struct msg_list *msg_stack = NULL, *msg_ptr = NULL;
- +
- + export int message_history = 15;
- export char *term_name = NULL;
- export int show_current_time = 1;
- export int conf_dont_sleep = 0;
- export int prompt_length;
- ! export int terminal_speed = 0;
- export int slow_speed = 1200;
- export int any_message = 0;
- export int flow_control = 1;
- ***************
- *** 38,43 ****
- --- 45,51 ----
- export key_type delword_key = CONTROL_('W');
-
- static char bell_str[256] = "\007";
- + static appl_keypad_mode = 0;
-
- #ifdef USE_TERMINFO
-
- ***************
- *** 69,74 ****
- --- 77,83 ----
- static char enter_standout_mode[64], exit_standout_mode[64];
- static char enter_underline_mode[64], exit_underline_mode[64];
- static char key_down[64], key_up[64], key_right[64], key_left[64];
- + static char keypad_local[64], keypad_xmit[64];
-
- int magic_cookie_glitch; /* magic cookie size */
-
- ***************
- *** 295,301 ****
- terminal_speed = 30;
- }
-
- ! init_term()
- {
- #ifdef USE_TERMCAP
- char tbuf[1024];
- --- 304,311 ----
- terminal_speed = 30;
- }
-
- ! init_term(full)
- ! int full;
- {
- #ifdef USE_TERMCAP
- char tbuf[1024];
- ***************
- *** 302,308 ****
- #endif
-
- if ((term_name = getenv("TERM")) == NULL)
- ! user_error("No TERM variable in enviroment");
-
- #ifdef HAVE_TERMIO
- ioctl(0, TCGETA, &norm_tty);
- --- 312,320 ----
- #endif
-
- if ((term_name = getenv("TERM")) == NULL)
- ! user_error("No TERM variable in environment");
- !
- ! if (!full) return;
-
- #ifdef HAVE_TERMIO
- ioctl(0, TCGETA, &norm_tty);
- ***************
- *** 360,365 ****
- --- 372,379 ----
-
- opt_cap("ti", enter_ca_mode);
- opt_cap("te", exit_ca_mode);
- + opt_cap("ks", keypad_xmit); /* used to turn "application cursor */
- + opt_cap("ke", keypad_local); /* key" mode on and off (sometimes) */
-
- if (!use_visible_bell || !opt_cap("vb", bell_str))
- if (!opt_cap("bl", bell_str))
- ***************
- *** 440,445 ****
- --- 454,467 ----
- if (HAS_CAP(key_left))
- enter_multi_key(K_left_arrow, (key_type *)key_left);
-
- + appl_keypad_mode = (HAS_CAP(keypad_xmit) && HAS_CAP(keypad_local));
- + if (!HAS_CAP(key_up)) appl_keypad_mode = 0; /* no cursor keys */
- + if (appl_keypad_mode) {
- + /* Use of ks/ke isn't consistent, so we must guess what to do. */
- + /* If termcap expects keys to send ESC [, don't switch */
- + appl_keypad_mode = (key_up[0] != '\033' || key_up[1] != '[');
- + }
- +
- visual_on();
- }
-
- ***************
- *** 476,481 ****
- --- 498,504 ----
- tputs(clear_screen, Lines, outc);
- #endif
- curxy_c = savxy_c = -1;
- + msg_ptr = msg_stack;
- }
-
- clrline()
- ***************
- *** 505,510 ****
- --- 528,534 ----
- gotoxy(0, olineno);
- fl;
- }
- + msg_ptr = msg_stack;
- }
-
- static char so_buf[512], *so_p;
- ***************
- *** 648,653 ****
- --- 672,681 ----
- putp(enter_ca_mode);
- is_visual = 1;
- }
- + if (appl_keypad_mode) {
- + putp(keypad_xmit);
- + is_visual = 1;
- + }
- }
-
- visual_off()
- ***************
- *** 654,663 ****
- {
- int was_raw = is_raw;
-
- ! if (term_name == NULL) return 0;
-
- ! if (is_visual && HAS_CAP(exit_ca_mode)) putp(exit_ca_mode), fl;
- ! is_visual = 0;
-
- is_raw = 1;
- unset_raw();
- --- 682,695 ----
- {
- int was_raw = is_raw;
-
- ! if (terminal_speed == 0) return 0;
-
- ! if (is_visual) {
- ! if (appl_keypad_mode) putp(keypad_local);
- ! if (HAS_CAP(exit_ca_mode)) putp(exit_ca_mode);
- ! fl;
- ! is_visual = 0;
- ! }
-
- is_raw = 1;
- unset_raw();
- ***************
- *** 1381,1389 ****
- char *fmt;
- use_vararg;
-
- ! unset_raw();
- ! clrdisp();
- ! fl;
-
- start_vararg;
- fmt = va_arg1(char *);
- --- 1413,1423 ----
- char *fmt;
- use_vararg;
-
- ! if (terminal_speed != 0) {
- ! clrdisp();
- ! visual_off();
- ! fl;
- ! }
-
- start_vararg;
- fmt = va_arg1(char *);
- ***************
- *** 1406,1420 ****
- end_vararg;
- }
-
- vmsg(va_tail)
- va_tdcl
- {
- ! static char errmsg[512] = "";
- ! char *fmt;
- !
- fmt = va_arg1(char *);
-
- ! if (fmt) vsprintf(errmsg, fmt, va_args2toN);
-
- gotoxy(0, Lines-1);
- fputs(errmsg, stdout);
- --- 1440,1494 ----
- end_vararg;
- }
-
- + push_msg(str)
- + char *str;
- + {
- + register struct msg_list *mp, *newmsg;
- + static int slots = 0;
- +
- + if (str != NULL) {
- + if (slots > message_history) {
- + for (mp = newmsg = msg_stack; mp->prev != NULL; mp = mp->prev)
- + newmsg = mp;
- + if (newmsg == mp)
- + msg_stack = NULL;
- + else {
- + newmsg->prev = NULL;
- + newmsg = mp;
- + }
- + freeobj(newmsg->buf);
- + } else {
- + slots++;
- + newmsg = newobj(struct msg_list, 1);
- + }
- + newmsg->buf = copy_str(str);
- + newmsg->prev = msg_stack;
- + msg_stack = newmsg;
- + }
- + msg_ptr = msg_stack;
- + }
- +
- vmsg(va_tail)
- va_tdcl
- {
- ! char *errmsg, *fmt;
- !
- fmt = va_arg1(char *);
-
- ! if (fmt) {
- ! char buf[512];
- !
- ! vsprintf(buf, fmt, va_args2toN);
- ! push_msg(buf);
- ! }
- !
- ! if (msg_ptr) {
- ! errmsg = msg_ptr->buf;
- ! msg_ptr = msg_ptr->prev;
- ! } else {
- ! errmsg = "(no more messages)";
- ! msg_ptr = msg_stack;
- ! }
-
- gotoxy(0, Lines-1);
- fputs(errmsg, stdout);
- *** ./LAST/variable.c Tue May 29 18:36:40 1990
- --- variable.c Tue Jun 12 09:32:49 1990
- ***************
- *** 73,78 ****
- --- 73,79 ----
- ignore_xon_xoff,
- include_art_id,
- include_full_header,
- + include_mark_blanks,
- keep_rc_backup,
- keep_unsubscribed,
- keep_unsub_long,
- ***************
- *** 121,131 ****
- --- 122,134 ----
- expired_msg_delay,
- first_page_lines,
- fmt_linenum,
- + kill_debug,
- Lines,
- match_skip_prefix,
- mark_next_group,
- mark_read_return,
- mark_read_skip,
- + message_history,
- min_pv_window,
- new_group_action,
- newsrc_update_freq,
- ***************
- *** 243,251 ****
- --- 246,256 ----
- "ignore-xon-xoff", BOOL 0, (char **)&ignore_xon_xoff,
- "include-art-id", BOOL 0, (char **)&include_art_id,
- "include-full-header", BOOL 0, (char **)&include_full_header,
- + "include-mark-blank-lines", BOOL 0, (char **)&include_mark_blanks,
- "included-mark", STR 1, (char **)included_mark,
- "keep-unsubscribed", BOOL 0, (char **)&keep_unsubscribed,
- "kill", BOOL 0, (char **)&do_kill_handling,
- + "kill-debug", BOOL 0, (char **)&kill_debug,
- "kill-key", KEY 0, (char **)&kill_key,
- "layout", INT 1, (char **)&fmt_linenum,
- "limit", INT 2, (char **)&article_limit,
- ***************
- *** 263,268 ****
- --- 268,274 ----
- "marked-by-next-group", INT 0, (char **)&mark_next_group,
- "marked-by-read-return", INT 0, (char **)&mark_read_return,
- "marked-by-read-skip", INT 0, (char **)&mark_read_skip,
- + "message-history", INT 0, (char **)&message_history,
- "min-window", INT 1, (char **)&min_pv_window,
- "mmdf-format", BOOL 0, (char **)&use_mmdf_folders,
- "monitor", BOOL 0, (char **)&monitor_mode,
- ***************
- *** 370,381 ****
- }
-
-
- static adjust(str)
- register char *str;
- {
- ! if (str == NULL) return;
- ! while (*str && !isspace(*str) && *str != '#') str++;
- ! *str = NUL;
- }
-
- set_variable(variable, on, val_string)
- --- 376,422 ----
- }
-
-
- + static char escaped_char(c)
- + char c;
- + {
- + switch (c) {
- + case 'a':
- + return 007;
- + case 'b':
- + return BS;
- + case 'e':
- + return 033;
- + case 'f':
- + return '\f';
- + case 'n':
- + return NL;
- + case 'r':
- + return CR;
- + case 't':
- + return TAB;
- + }
- + return c;
- + }
- +
- static adjust(str)
- register char *str;
- {
- ! register char *s, *t;
- !
- ! if ((s = t = str) == NULL) return;
- ! while (*s && *s != '#') {
- ! if (*s == '\\' && s[1] != NUL) {
- ! s++;
- ! *str++ = escaped_char(*s++);
- ! } else
- ! if (str == s) {
- ! str++;
- ! if (isspace(*s++)) continue;
- ! } else
- ! if (isspace(*str++ = *s++)) continue;
- ! t = str;
- ! }
- ! *t = NUL;
- }
-
- set_variable(variable, on, val_string)
- ***************
- *** 417,422 ****
- --- 458,465 ----
-
- case V_STRING:
-
- + if (on) adjust(val_string);
- +
- switch (VAR_OP) {
- case 0:
- STR_VAR = (on && val_string) ? copy_str(val_string) : (char *)NULL;
- ***************
- *** 430,436 ****
- if (on) {
- char exp_buf[FILENAME];
-
- - adjust(val_string);
- if (val_string) {
- if (expand_file_name(exp_buf, val_string, 1))
- STR_VAR = home_relative(exp_buf);
- --- 473,478 ----
- ***************
- *** 871,877 ****
- home();
- }
- pg_next();
- ! so_printf("\1Variable settings:\1");
-
- for (var = variables; var < &variables[TABLE_SIZE]; var++) {
- pushed =
- --- 913,919 ----
- home();
- }
- pg_next();
- ! so_printf("Variable settings:");
-
- for (var = variables; var < &variables[TABLE_SIZE]; var++) {
- pushed =
- *** ./LAST/xmakefile Wed May 16 11:23:59 1990
- --- xmakefile Tue Jun 12 09:44:57 1990
- ***************
- *** 16,21 ****
- --- 16,29 ----
- #define EXTRA_LIB
- #endif
-
- + #ifndef NNTP
- + #undef NNTP_EXTRA_LIB
- + #endif
- +
- + #ifndef NNTP_EXTRA_LIB
- + #define NNTP_EXTRA_LIB
- + #endif
- +
- #ifdef HAVE_ROUTING
- #define NNMAIL
- #else
- ***************
- *** 79,89 ****
-
- nn: $(NN)
- @echo linking nn
- ! @$(CC) $(CFLAGS) $(NN) TERMLIB EXTRA_LIB -o nn
-
- nnmaster: $(MASTER)
- @echo linking nnmaster
- ! @$(CC) $(CFLAGS) $(MASTER) EXTRA_LIB -o nnmaster
-
- nnmail: $(MAIL)
- @echo linking nnmail
- --- 87,97 ----
-
- nn: $(NN)
- @echo linking nn
- ! @$(CC) $(CFLAGS) $(NN) -o nn TERMLIB EXTRA_LIB NNTP_EXTRA_LIB
-
- nnmaster: $(MASTER)
- @echo linking nnmaster
- ! @$(CC) $(CFLAGS) $(MASTER) -o nnmaster EXTRA_LIB NNTP_EXTRA_LIB
-
- nnmail: $(MAIL)
- @echo linking nnmail
- ***************
- *** 161,166 ****
- --- 169,175 ----
-
- clean:
- rm -f $(BIN_PROG) $(LIB_PROG) $(MASTER_PROG) cvt-help usercheck
- + rm -f prefix mkprefix inst
-
- *
- * dependencies
-